using System.Collections;
using System.Collections.Generic;
using UnityEngine;

//自动生成于：2020/11/10 17:26:21
namespace StarForce
{

	public partial class ListPage : UGuiForm
	{
		private Collection<ItemDemo> m_ItemDemoListH;
		private Collection<ItemDemo> m_ItemDemoListV;
		
		protected override void OnInit(object userdata)
		{
			base.OnInit(userdata);

			GetBindComponents(gameObject);
			
			m_ItemDemoListH = new Collection<ItemDemo>(m_SRect_H.content,m_SRect_H.gameObject);
			m_ItemDemoListV = new Collection<ItemDemo>(m_SRect_V.content,m_SRect_H.gameObject);
			
			m_Btn_Close.onClick.AddListener(Close);
		}

		protected override void OnOpen(object userData)
		{
			base.OnOpen(userData);

			for (int i = 0; i < 20; i++)
			{
				ItemDemo demo1 = m_ItemDemoListH.GetOrAddItem(i);
				ItemDemo demo2 = m_ItemDemoListV.GetOrAddItem(i);

				demo1.Num.text = i.ToString();
				demo2.Num.text = i.ToString();
			}
		}
	}
}
